package App.Model;

/**
 * Created by xw on 2018/11/15.
 */
public class BaseEnum {

    public enum Status {

        //可用
        Enable(1),

        //禁用
        Disable(0);

        private int i;

        private Status(int i) {
            this.i = i;
        }

        public int getStatus() {

            return i;
        }
    }


    public enum ApiResult {
        Failure(0),
        Success(1);

        private int i;

        private ApiResult(int i) {
            this.i = i;
        }

        public int getApiResult() {
            return i;

        }
    }

    //用户状态
    public enum UserStatus {

        //可用
        Enable(1),

        //禁用
        Disable(0);

        private int i;

        private UserStatus(int i) {
            this.i = i;
        }

        public int getUserStatus() {

            return i;
        }
    }


    //委托人和对方当事人
    public enum PersonType {

        Client(0),
        litigant(1);
        private int i;

        private PersonType(int i) {
            this.i = i;
        }

        public int getPersonType() {
            return i;
        }
    }


    //联系人类型 0:合议庭人员,1:书记员人员
    public enum ContactType {
        FullCount(0),
        Clerk(1);

        private int i;

        private ContactType(int i) {
            this.i = i;
        }

        public int getContactType() {
            return i;
        }


    }


    // '聊天的对象类型,0:项目,1:任务',
    public enum ChatType {

        //项目
        Project(0),

        //任务
        Task(1),

        //阶段
        Stage(2);

        private int i;

        private ChatType(int i) {
            this.i = i;
        }

        public int getChatType() {
            return i;
        }
    }


    // 分组类型 (1:委托人协作团队,2:律师协作团队))
    public enum GroupType {

        //委托人协作团队
        Client(1),

        //律师协作团队
        Lawyer(2);

        private int i;

        private GroupType(int i) {
            this.i = i;
        }

        public int getGroupType() {
            return i;
        }
    }


    public enum InnerGroupType {

        //委托人组
        ClientGroup(1),

        //律师代理组
        LawyerGroup(2);

        private int i;

        private InnerGroupType(int i) {
            this.i = i;
        }

        public int getInnerGroupType() {
            return i;
        }
    }


    public enum StageStatus {

        //项目
        Start(1),

        //任务
        Complete(2);

        private int i;

        private StageStatus(int i) {
            this.i = i;
        }

        public int getStageStatus() {
            return i;
        }
    }


    public enum ProjectTitleType {

        //系统默认身份
        Basic(0),

        //用户自定义身份
        UserDefine(1);

        private int i;

        private ProjectTitleType(int i) {
            this.i = i;
        }

        public int getProjectTitleType() {
            return i;
        }
    }

    public enum ProjectFolderType {
        //公共
        Common(0),

        //阶段文件夹
        Stage(1),

        //委托人文件夹
        Client(2),

        //对方当事人文件夹
        Litigant(3),

        //用户自定义
        UserDefine(4);

        private int i;

        private ProjectFolderType(int i) {
            this.i = i;
        }

        public int getProjectFolderType() {
            return i;
        }
    }

    public enum TaskStatus {

        //暂停
        Pause(0),

        //正常
        Normal(1),

        //完成
        Complete(2);

        private int i;

        private TaskStatus(int i) {
            this.i = i;
        }

        public int getTaskStatus() {
            return i;
        }
    }


    //任务提醒的重复类型
    //1:一次,2:每天,3:每周,4:每月,5
    public enum TaskRepeatType {

        //不重复
        Once(1),

        //每天
        Day(2),

        //每周
        Week(3),

        //每月
        Month(4),

        //每年
        Year(5);

        private int i;

        private TaskRepeatType(int i) {
            this.i = i;
        }

        public int getTaskRepeatType() {
            return i;
        }
    }


    //任务提前的时间类型
    //1:秒,2:分,3:小时,4:天,5周,6:月,7:年
    public enum TaskAheadType {

        //秒
        Second(1),

        //分钟
        Minute(2),

        //小时
        Hour(3),

        //天
        Day(4),

        //周
        Week(5),

        //月
        Month(6),

        //年
        Year(7);

        private int i;

        private TaskAheadType(int i) {
            this.i = i;
        }

        public int getTaskAheadType() {
            return i;
        }
    }


    public enum UserGender {

        //男性
        man(0),

        //女性
        female(1);


        private int i;

        private UserGender(int i) {
            this.i = i;
        }

        public int getUserGender() {
            return i;
        }
    }


    public enum UserTitle {

        //律师
        lawyer(0),

        //委托人
        client(1);


        private int i;

        private UserTitle(int i) {
            this.i = i;
        }

        public int getUserTitle() {
            return i;
        }
    }

    public enum RecType {
        //自然人
        Yes(1),
        //非自然人
        No(0);

        private int i;

        private RecType(int i) {
            this.i = i;
        }

        public int getRecType() {
            return i;
        }
    }

    public enum ContactApplyStatus {

        //等待
        Wait(0),

        //通过
        Pass(1),

        //拒绝
        Deny(2);

        private int i;

        private ContactApplyStatus(int i) {
            this.i = i;
        }

        public int getContactApplyStatus() {
            return i;
        }
    }


    public enum StageType {

        //基本阶段
        Basic(0),

        //自定义阶段
        Define(1);


        private int i;

        private StageType(int i) {
            this.i = i;
        }

        public int getStageType() {
            return i;
        }
    }


    public enum DefaultFolderType {

        //委托人可以看到的文件夹
        ClientFolder(0),

        //律师协作团队可以看到的文件夹
        LawyerFolder(1),

        //律师协作团队可以看到的文件夹,无律师协作团队前缀',
        LawyerFolderWithOutPrefix(2);

        private int i;

        private DefaultFolderType(int i) {
            this.i = i;
        }

        public int getDefaultFolderType() {
            return i;
        }

    }


    public enum ProjectFolderDefineType {

        //非自定义文件夹
        Basic(0),

        //用户自定义文件夹
        UserDefine(1);

        private int i;

        private ProjectFolderDefineType(int i) {
            this.i = i;
        }

        public int getProjectFolderDefineType() {
            return i;
        }
    }


    public enum ChatGroupType {

        //委托人协作团队
        Client(1),

        //律师代理组
        ClientLawyer(2),

        //律师协作团队
        Lawyer(3);

        private int i;

        private ChatGroupType(int i) {
            this.i = i;
        }

        public int getChatGroupType() {
            return i;
        }
    }


    //聊天分支阶段操作类型
    public enum ChatBranchStageOperateType {

        //未启动
        UnStart(0),

        //已启动
        Start(1);

        private int i;

        private ChatBranchStageOperateType(int i) {
            this.i = i;
        }

        public int getChatBranchStageOperateType() {
            return i;
        }
    }

    //用户认证通过状态
    public enum AuthUserPassStatus {

        //未通过认证
        UnPassed(0),

        //已经通过认证
        Passed(1);

        private int i;

        private AuthUserPassStatus(int i) {
            this.i = i;
        }

        public int getAuthUserPassStatus() {
            return i;
        }
    }

    //聊天分支阶段操作类型
    public enum ProjectStatusType {

        //未完成
        UnComplete(0),

        //已完成
        Complete(1);

        private int i;

        private ProjectStatusType(int i) {
            this.i = i;
        }

        public int getProjectStatusType() {
            return i;
        }
    }


    //用户认证类型
    public enum AuthUserType {

        //律师
        Lawyer(1);

        private int i;

        private AuthUserType(int i) {
            this.i = i;
        }

        public int getAuthUserType() {
            return i;
        }
    }


    //用户认证阶段
    public enum AuthUserProcess {

        //未认证
        UnAuth(0),

        //认证中
        Authing(1),

        //已认证
        Authed(2);

        private int i;

        private AuthUserProcess(int i) {
            this.i = i;
        }

        public int getAuthUserProcess() {
            return i;
        }
    }


    //项目阶段状态
    public enum ProjectStageStatus {

        //开始
        Start(1),

        //已完成
        Complete(2);

        private int i;

        private ProjectStageStatus(int i) {
            this.i = i;
        }

        public int getProjectStageStatus() {
            return i;
        }
    }

    public  enum ClientType{
        none(0),
        android(1),
        ios(2),
        web(3);

        private int i;
        private ClientType(int i) {
            this.i = i;
        }
        public int getClientType() {
            return i;
        }

        public static int getClientTypeStr(String str) {
            if(str == null) return none.getClientType();
            if(str.equalsIgnoreCase("android")){
                return android.getClientType();
            }else  if(str.equalsIgnoreCase("ios")){
                return ios.getClientType();
            }else  if(str.equalsIgnoreCase("web")){
                return web.getClientType();
            }
            return none.getClientType();
        }
    }

    public  enum ResultType{
        Success(1),
        Fail(0);

        private int i;
        private ResultType(int i) {
            this.i = i;
        }
        public int getResultType() {
            return i;
        }
    }

    public  enum MsgCallBackType{
        none(0),
        GroupCallbackAfterSendMsg(1);

        private int i;
        private MsgCallBackType(int i) {
            this.i = i;
        }
        public int getMsgCallBackType() {
            return i;
        }

        public static int getMsgCallBackTypeStr(String str) {
            if(str.equalsIgnoreCase("Group.CallbackAfterSendMsg")){
                return GroupCallbackAfterSendMsg.getMsgCallBackType();
            }

            return none.getMsgCallBackType();
        }
    }

    public  enum MsgCallBackContentType{
        none(0),
        Text(1),
        Location(2),
        Face(3),
        Custom(4),
        Sound(5),
        Image(6),
        File(7),
        VideoFile(8);

        private int i;
        private MsgCallBackContentType(int i) {
            this.i = i;
        }
        public int getMsgCallBackContentType() {
            return i;
        }

        public static int getMsgCallBackContentTypeStr(String str) {
            if(str.equalsIgnoreCase("TIMTextElem")){
                return Text.getMsgCallBackContentType();
            }
            else if(str.equalsIgnoreCase("TIMLocationElem")){
                return Location.getMsgCallBackContentType();
            }
            else if(str.equalsIgnoreCase("TIMCustomElem")){
                return Custom.getMsgCallBackContentType();
            }
            else if(str.equalsIgnoreCase("TIMImageElem")){
                return Image.getMsgCallBackContentType();
            }

            //todo 其他消息类型
            return none.getMsgCallBackContentType();
        }
    }

    public  enum MsgCallBackContentCategory{
        none(0),
        Private(1),
        Public(2);

        private int i;
        private MsgCallBackContentCategory(int i) {
            this.i = i;
        }
        public int getMsgCallBackContentCategory() {
            return i;
        }

        public static int getMsgCallBackContentCategoryStr(String str) {
            if(str.equalsIgnoreCase("Private")){
                return Private.getMsgCallBackContentCategory();
            }
            else if(str.equalsIgnoreCase("Public")){
                return Public.getMsgCallBackContentCategory();
            }

            //todo 其他消息类型
            return none.getMsgCallBackContentCategory();
        }
    }

    public enum ProjectDefineType {
        //民事行政
        MSXZ(1),
        //刑事
        XS(2),
        //法律顾问
        FLGW(3),
        //专项
        ZX(4);

        private int i;

        private ProjectDefineType(int i) {
            this.i = i;
        }

        public int getProjectDefineType() {
            return i;
        }
    }
}


